package com.freewater.springboot.demo.aop.instmode;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        final AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        applicationContext.registerShutdownHook();

        SomeBusiness someBusiness1 = applicationContext.getBean(SomeBusinessImpl1.class);
        SomeBusiness someBusiness2 = applicationContext.getBean(SomeBusinessImpl2.class);
        someBusiness1.doSomething("freewater");
        someBusiness2.doSomething("freewater");
    }
}
